//
//  BVIndexTool.m
//  BuyVegetable
//
//  Created by yushanchang on 16/10/12.
//  Copyright © 2016年 com.yinding. All rights reserved.
//

#import "BVIndexTool.h"
#import "BVSelectArea.h"

@implementation BVIndexTool

- (void)fetchAllProvinceSuccess:(void (^)(NSArray *))success failure:(void (^)(NSError *))failure {
    
    NSString *url = [NSString stringWithFormat:@"%@/IndexAPI/get_city",PATH];
    [BVHttpRequest getWithUrlString:url parameters:nil success:^(id responseObject) {
        if ([responseObject[@"code"] isEqualToString:@"0"]) {
            NSArray *areaArr = [BVSelectArea mj_objectArrayWithKeyValuesArray:responseObject[@"result"]];
            success(areaArr);
        }
    } failure:^(NSError *error) {
        
    }];
    
}

@end
